#-*- coding: utf-8 -*-

"""
    PyJICK: Python Intelligent Control KIT
    Copyright (C) 2012  Jack Krieger
    This file is part of PyJICK.

    See the file LICENSE for copying permission.
"""

class Stream():
	def __init__(self, stream):
		self.stream = stream

	def sendm(self, msg):
		print 'send'
		self.stream.send_message(mto=msg['from'].bare,
							  mbody="I heard that, %s." % msg['mucnick'],
							  mtype='groupchat')


class Plum():
	# участник конфы
	def __init__(self, id, name, afl='none', role='none'):
		
		# типа реал джид
		self.id = id

		# ник в конференции
		self.name = name

		self.affiliation = afl
		self.role = role

		self.options = {}



	def get(self, option):
		""" чтение временных параметров (afl, role) """
		return None

	def set(self, option, value):
		""" запись временных параметров (afl, role) """
		pass

	def load(self, option):
		""" чтение долговременных параметров (last_seen, carma) """
		return None

	def save(self, option, value):
		""" запись долговременных параметров (last_seen, carma) """
		pass
